Segment routing (SR) is a method for transferring, by a control plane by using the Interior Gateway Protocol (IGP), a Multiprotocol Label Switching (MPLS) label that has a global meaning or local meaning and is corresponding to an SR router. Typical IGPs are the Intermediate System to Intermediate System (IS-IS) protocol and the Open Shortest Path First (OSPF) protocol.
A data plane performs MPLS data packet forwarding based on an MPLS label delivered by a Segment Routing control plane, so as to achieve an objective of simplifying operation and maintenance management of an MPLS network.
To facilitate understanding of a segment routing technical solution, the following example is presented for a scenario where a control plane delivers a label having a global meaning.
Referring to FIG. 1, an egress SR router (that is, element Z) advertises its own node segment label according to a method defined by a segment routing protocol and by using an IGP protocol (such as IS-IS or OSPF) extension, and it is assumed that the node segment label is 65 (see FIG. 1). When an ingress SR router (that is, element A) needs to send an original data packet to Z, the ingress SR router adds a node segment Label (that is, “65”) corresponding to Z before the original data packet, and then sends, to a next-hop SR router (that is, element B), an MPLS packet that is formed after the original data packet is encapsulated. In a subsequent process, an SR router (such as elements B, C, and D) that receives the foregoing MPLS data packet forwards hop-by-hop the foregoing MPLS data packet to a destination Z according to the node segment label (that is, “65”).
However, a scenario of hybrid networking of an SR router and a non-SR router is not considered in an existing Segment Routing technical solution. Referring to FIG. 2, it is assumed that C does not support an SR characteristic, but according to provisions in ISIS and OSPF protocols, on a control plane, when an ISIS or OSPF node receives a type-length-value (TLV) that the ISIS or OSPF node does not know, the ISIS or the OSPF node still sends the TLV to a neighboring node. That is, when receiving a TLV that includes SR related information (for example, a node segment Label), although C cannot identify the TLV, C still advertises the TLV to a surrounding neighboring node, such as B and D. However, on a data plane, when B forwards, to C, an MPLS data packet (a top label of the data packet is the node segment label corresponding to Z, that is, the label 65) that is received from A and whose destination is Z, C discards the received MPLS data packet because C does not support the SR characteristic (that is, a corresponding MPLS forwarding entry does exist on the data plane).
Therefore, the inventor noticed the following issues exist in the conventional art: when router hybrid networking of an SR router and a non-SR router is used, a packet discard phenomenon occurs because a router does not support an SR characteristic inevitably, which results in that an MPLS data packet cannot be correctly forwarded in a hybrid networking environment.